package com.eastfair.home.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.home.enumeration.ReportDrawingCategoryAuditHistoryAuditStatusEnum;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 报馆图纸分类审核记录历史
 * </p>
 *
 * @author dqq
 * @since 2023-05-04
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("hc_report_drawing_category_audit_history")
@ApiModel(value = "ReportDrawingCategoryAuditHistory", description = "报馆图纸分类审核记录历史")
@AllArgsConstructor
public class ReportDrawingCategoryAuditHistory extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 报馆图纸分类审核ID
     */
    @ApiModelProperty(value = "报馆图纸分类审核ID")
    @TableField(value = "report_drawing_category_audit_id")
    @Excel(name = "报馆图纸分类审核ID")
    private Long reportDrawingCategoryAuditId;

    /**
     * 报馆审核ID
     */
    @ApiModelProperty(value = "报馆审核ID")
    @TableField(value = "report_space_audit_id")
    @Excel(name = "报馆审核ID")
    private Long reportSpaceAuditId;

    /**
     * 报馆ID
     */
    @ApiModelProperty(value = "报馆ID")
    @TableField(value = "report_space_id")
    @Excel(name = "报馆ID")
    private Long reportSpaceId;

    /**
     * 图片分类ID
     */
    @ApiModelProperty(value = "图片分类ID")
    @TableField(value = "drawing_category_id")
    @Excel(name = "图片分类ID")
    private Long drawingCategoryId;

    /**
     * 图片分类名称
     */
    @ApiModelProperty(value = "图片分类名称")
    @Size(max = 100, message = "图片分类名称长度不能超过100")
    @TableField(value = "drawing_category_name", condition = LIKE)
    @Excel(name = "图片分类名称")
    private String drawingCategoryName;

    /**
     * 图片分类序号
     */
    @ApiModelProperty(value = "图片分类序号")
    @TableField(value = "drawing_category_sort")
    @Excel(name = "图片分类序号")
    private Integer drawingCategorySort;

    /**
     * 是否双层：0-否，1-是
     */
    @ApiModelProperty(value = "是否双层：0-否，1-是")
    @TableField(value = "is_double")
    @Excel(name = "是否双层：0-否，1-是")
    private Integer isDouble;

    /**
     * 是否吊点：0-否，1-是
     */
    @ApiModelProperty(value = "是否吊点：0-否，1-是")
    @TableField(value = "is_point")
    @Excel(name = "是否吊点：0-否，1-是")
    private Integer isPoint;

    /**
     * 审核状态 #{SUBMIT:待审核;APPROVED:审核通过;NOT_APPROVED:审核未通过}
     */
    @ApiModelProperty(value = "审核状态 #{SUBMIT:待审核;APPROVED:审核通过;NOT_APPROVED:审核未通过}")
    @TableField(value = "audit_status")
    @Excel(name = "审核状态 #{SUBMIT:待审核;APPROVED:审核通过;NOT_APPROVED:审核未通过}", replace = {"待审核_SUBMIT", "审核通过_APPROVED", "审核未通过_NOT_APPROVED",  "_null"})
    private ReportDrawingCategoryAuditHistoryAuditStatusEnum auditStatus;

    /**
     * 审核意见
     */
    @ApiModelProperty(value = "审核意见")
    @Size(max = 200, message = "审核意见长度不能超过200")
    @TableField(value = "audit_opinion", condition = LIKE)
    @Excel(name = "审核意见")
    private String auditOpinion;

    /**
     * 提交时间
     */
    @ApiModelProperty(value = "提交时间")
    @TableField(value = "report_time")
    @Excel(name = "提交时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime reportTime;

    /**
     * 审核时间
     */
    @ApiModelProperty(value = "审核时间")
    @TableField(value = "audit_time")
    @Excel(name = "审核时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime auditTime;

    /**
     * 审核人id
     */
    @ApiModelProperty(value = "审核人id")
    @TableField(value = "audit_user_id")
    @Excel(name = "审核人id")
    private Long auditUserId;

    /**
     * 审核人姓名
     */
    @ApiModelProperty(value = "审核人姓名")
    @Size(max = 100, message = "审核人姓名长度不能超过100")
    @TableField(value = "audit_user_name", condition = LIKE)
    @Excel(name = "审核人姓名")
    private String auditUserName;

    /**
     * 场馆审核人ID
     */
    @ApiModelProperty(value = "场馆审核人ID")
    @TableField(value = "venue_audit_user_id")
    @Excel(name = "场馆审核人ID")
    private Long venueAuditUserId;

    /**
     * 场馆审核姓名
     */
    @ApiModelProperty(value = "场馆审核姓名")
    @Size(max = 100, message = "场馆审核姓名长度不能超过100")
    @TableField(value = "venue_audit_user_name", condition = LIKE)
    @Excel(name = "场馆审核姓名")
    private String venueAuditUserName;

    /**
     * 场馆审核状态
     */
    @ApiModelProperty(value = "场馆审核状态")
    @Size(max = 64, message = "场馆审核状态长度不能超过64")
    @TableField(value = "venue_audit_status", condition = LIKE)
    @Excel(name = "场馆审核状态")
    private String venueAuditStatus;

    /**
     * 场馆审核意见
     */
    @ApiModelProperty(value = "场馆审核意见")
    @Size(max = 200, message = "场馆审核意见长度不能超过200")
    @TableField(value = "venue_audit_opinion", condition = LIKE)
    @Excel(name = "场馆审核意见")
    private String venueAuditOpinion;

    /**
     * 场馆审核时间
     */
    @ApiModelProperty(value = "场馆审核时间")
    @TableField(value = "venue_audit_time")
    @Excel(name = "场馆审核时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime venueAuditTime;

    /**
     * 总体审核状态
     */
    @ApiModelProperty(value = "总体审核状态")
    @Size(max = 64, message = "总体审核状态长度不能超过64")
    @TableField(value = "drawing_audit_status", condition = LIKE)
    @Excel(name = "总体审核状态")
    private String drawingAuditStatus;


    @Builder
    public ReportDrawingCategoryAuditHistory(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    Long reportDrawingCategoryAuditId, Long reportSpaceAuditId, Long reportSpaceId, Long drawingCategoryId, String drawingCategoryName, Integer drawingCategorySort, 
                    Integer isDouble, Integer isPoint, ReportDrawingCategoryAuditHistoryAuditStatusEnum auditStatus, String auditOpinion, LocalDateTime reportTime, LocalDateTime auditTime, 
                    Long auditUserId, String auditUserName, Long venueAuditUserId, String venueAuditUserName, String venueAuditStatus, String venueAuditOpinion, 
                    LocalDateTime venueAuditTime, String drawingAuditStatus) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.reportDrawingCategoryAuditId = reportDrawingCategoryAuditId;
        this.reportSpaceAuditId = reportSpaceAuditId;
        this.reportSpaceId = reportSpaceId;
        this.drawingCategoryId = drawingCategoryId;
        this.drawingCategoryName = drawingCategoryName;
        this.drawingCategorySort = drawingCategorySort;
        this.isDouble = isDouble;
        this.isPoint = isPoint;
        this.auditStatus = auditStatus;
        this.auditOpinion = auditOpinion;
        this.reportTime = reportTime;
        this.auditTime = auditTime;
        this.auditUserId = auditUserId;
        this.auditUserName = auditUserName;
        this.venueAuditUserId = venueAuditUserId;
        this.venueAuditUserName = venueAuditUserName;
        this.venueAuditStatus = venueAuditStatus;
        this.venueAuditOpinion = venueAuditOpinion;
        this.venueAuditTime = venueAuditTime;
        this.drawingAuditStatus = drawingAuditStatus;
    }

}
